home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 008a / fglqbx10.zip / 06-07.BAS < prev    next >
BASIC Source File  |  1991-06-07  |  648b  |  42 lines

  1. REM $INCLUDE: 'fastgraf.bi'
  2.  
  3. DEFINT A-Z
  4.  
  5. CONST Vertices = 10
  6.  
  7. DIM X(Vertices), Y(Vertices)
  8.  
  9. REM x coordinates of vertices
  10. DATA 200,300,400,400,300,240,160,160,200,200
  11.  
  12. REM y coordinates of vertices
  13. DATA 100, 80,100,220,320,320,240,200,160,160
  14.  
  15. OldMode = FGgetmode
  16.  
  17. IF FGtestmode(16,1) THEN
  18.    FGsetmode 16
  19. ELSEIF FGtestmode(15,1) THEN
  20.    FGsetmode 15
  21. ELSE
  22.    PRINT "This program requires a 640 x 350 EGA graphics mode."
  23.    STOP
  24. END IF
  25.  
  26. FOR I = 0 TO Vertices-1
  27.    READ X(I)
  28. NEXT
  29.  
  30. FOR I = 0 TO Vertices-1
  31.    READ Y(I)
  32. NEXT
  33.  
  34. FGsetcolor 1
  35. FGpolygon X(), Y(), Vertices
  36. FGwaitkey
  37.  
  38. FGsetmode OldMode
  39. FGreset
  40.  
  41. END
  42.